package com.study.talk.netty.message.code;


import com.study.talk.netty.message.TalkMessage;

import io.netty.buffer.ByteBuf;
import io.netty.channel.ChannelHandlerContext;
import io.netty.handler.codec.MessageToByteEncoder;

public class MessageEncoder extends MessageToByteEncoder<TalkMessage> {
    @Override
    protected void encode(ChannelHandlerContext ctx, TalkMessage msg, ByteBuf out) throws Exception {
        MessageCode.INSTANCE.encode(out, msg);
    }
}
